//
//  AlertTabeleViewCell.m
//  StationManager
//
//  Created by 泽华伟业 on 17/3/10.
//  Copyright © 2017年 Helong. All rights reserved.
//

#import "AlertTabeleViewCell.h"

@interface AlertTabeleViewCell ()
//数据
@property (nonatomic,strong) UILabel *dataLabel;
//时间
@property (nonatomic,strong) UILabel *timeLabel;

@end

@implementation AlertTabeleViewCell

- (UILabel *)dataLabel{
    if (!_dataLabel) {
        _dataLabel = [[UILabel alloc]init];
        [self.contentView addSubview:_dataLabel];
        [_dataLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.contentView).offset(5*wl);
            make.top.bottom.equalTo(self.contentView);
            make.width.equalTo(self.contentView).dividedBy(3);
        }];
    }
    return _dataLabel;
}

- (UILabel *)timeLabel{
    if (!_timeLabel ) {
        _timeLabel = [[UILabel alloc]init];
        [self.contentView addSubview:_timeLabel];
        [_timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(_dataLabel.mas_right);
            make.right.top.bottom.equalTo(self.contentView);
            make.width.equalTo(_dataLabel).multipliedBy(2);
        }];
    }
    return _timeLabel;
}

- (void)setLabelTextWithData:(NSString *)data Time:(NSString *)time{
    [self.dataLabel setText:data];
    [self.timeLabel setText:time];
    [self.dataLabel setTextAlignment:NSTextAlignmentCenter];
    [self.timeLabel setTextAlignment:NSTextAlignmentCenter];
    [self.timeLabel setFont:TEXT_FONT];
    [self.dataLabel setFont:TEXT_FONT];
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
